const Koa = require('koa');
const app = new Koa();
const bodyParser = require('koa-bodyparser');
app.use(bodyParser())

const index = require('./router/index')
const login = require('./router/login')
const menus = require('./router/menus')
const tags = require('./router/tags')

app.use(index.routes(), index.allowedMethods()); // 首页
app.use(login.routes(), login.allowedMethods()); // 登录，注册，忘记密码
app.use(menus.routes(), menus.allowedMethods()); // 菜单
app.use(tags.routes(), menus.allowedMethods()); // 标签

app.listen(3001, () => {
  console.log('Api-saas-admin server is starting at port 3001')
})
